Skip to content

docs: distinguish logger retrieval from event context - #850

Open
valleysonata wants to merge 1 commit into
rs:masterfrom
valleysonata:docs/event-context-example
Open

valleysonata wants to merge 1 commit into
rs:masterfrom
valleysonata:docs/event-context-example

Conversation

@valleysonata

Copy link
Copy Markdown

Summary

Explain that retrieving a logger from a Go context does not attach that context to its events. Add a runnable example showing how explicitly attaching the context lets an event hook include a trace ID. No runtime behavior changes.

Refs #756.

Testing

  • go test -v -run '^ExampleCtx_eventContext$' .
  • go test -race ./...
  • go test -race -tags binary_log ./...
  • go vet ./...
  • git diff --check

AI disclosure: an OpenAI assistant prepared the documentation and example and ran these checks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant